package chapter_03_factory.p3_abstractFactory.product;

import chapter_03_factory.p3_abstractFactory.product.factory.AbstractFactory;
import chapter_03_factory.p3_abstractFactory.product.factory.AmdFactory;
import chapter_03_factory.p3_abstractFactory.product.factory.IntelFactory;

/**
 * Created by CharloYao on 2017/3/23.
 */
public class Client {
    public static void main(String[] args) {
        ComputerEngineer engineer = new ComputerEngineer();
        AbstractFactory af = new IntelFactory();
        engineer.makeComputer(af);

        //切换产品族；只需要修改工厂类；非常方便
        af = new AmdFactory();
        engineer.makeComputer(af);


    }
}
